import copy
from datasets.coco import CocoDataset
from datasets.dataset import listDataset
# from .xml_dataset import XMLDataset


def build_dataset(config):
    name = config.model.dataset
    if name == 'coco':
        return CocoDataset(config.train.imagePath, config.train.trainData, 416, mode=config.train_flag)
    else:
        return listDataset(config.train.trainData, augment=True, multiscale=config.train.multiscale_training)
